var task_id=GetQueryString('task_id');
var modifyData;
var qxlist ;
var dhbm ;
var readflag = true;
var processDefKey = "minbocaiji";
$(document).ready(function(){

	getUserInfo();
	qxlist = UserInfo.qxlist;
	var result = ajaxResult("get",false,"/cnmuseum/cj/getdetail",{"task_id":task_id});
	if(result.status=='OK'){
		modifyData=result.data;
		loadAddHtml();
	}
	
});
//审核是否通过，0表示通过，1是不通过
function submit(flag,ele){
	$("a[name=btn]").button('loading').delay(1000).queue(function() {
		$("a[name=btn]").button('reset');
		$("a[name=btn]").dequeue(); 
	});
	$(ele).button('loading').delay(1000).queue(function() {
		$(ele).button('reset');
		$(ele).dequeue(); 
		var params=$('#addForm').serializeObject();
		var words;
		if(flag==0){//通过
			params.next='wc';
			words='数据采集资源审核提交成功';
		}else{//退回
			params.next='cj';
			words='数据采集资源审核退回修改成功';
		}
		
		var result=ajaxResult('POST',false,'/cnmuseum/cj/submit',params);
		if(result.status=='OK'){
			alertFunc(words,function(){
				location.href='zysh.html';
			});
		}else{
			bootbox.alert(result.msg);
		}
	});
}